function [Bx0, By0, Vx0, Vy0] = TransFieldCompensationRF()
%TRANSFIELDCOMPENSATIONRF determines the transverse compensation fields
%(Bx, By) by minimizing the 1st harmonic signal of the pump beam
%transmission via a RF magnetometer configuration.
%   - set a longitudinal magnetic field Bz,and find the RF resonant
%   frequency
%   - drive the spins resonantly with a transverse RF field, and observe
%   the transimission signal of the pump beam
%   - scan the bias of Bx and By fields, and find the (Bx0, By0) which
%   minimizes the 1st harmonic signal (demodR)
%   Input:
%   - bz: the longitudinal magnetic field
%   - bRf: the amplitude of the RF driving field
%   - freq: the frequency of the RF driving field
%   - xRange: the scan range of Bx field
%   - yRange: the scan range of By field
%   - bw: demod bandwidth
%   - average: averaging number
%   - deviceX: the name of the ZI device which controls Bx
%   - deviceY: the name of the ZI device which controls By
%   - portX: port of ZI device controlling Bx
%   - portY: port of ZI device controlling By
outputArg1 = inputArg1;
outputArg2 = inputArg2;
end

